package org.dandelion;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import org.dandelion.account.AccountActivity;
import org.dandelion.calendar.CalenderActivity;
import org.dandelion.goalTest.GoalActivity;
import org.dandelion.memo.activity.MemoActivity;
import org.dandelion.moscode.MosCodeActivity;
import org.dandelion.ruler.RulerActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    private Button memoBtn;
    private Button goalTestBtn;
    private Button calendarBtn;
    private Button rulerBtn;
    private Button acconutBtn;
    private Button mosCodeBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        memoBtn = findViewById(R.id.btn_activity_memo);
        goalTestBtn = findViewById(R.id.btn_activity_goaltest);
        calendarBtn = findViewById(R.id.btn_activity_calendar);
        rulerBtn = findViewById(R.id.btn_activity_ruler);
        acconutBtn = findViewById(R.id.btn_activity_account);
        mosCodeBtn = findViewById(R.id.btn_activity_mos);


        memoBtn.setOnClickListener(this);
        goalTestBtn.setOnClickListener(this);
        calendarBtn.setOnClickListener(this);
        rulerBtn.setOnClickListener(this);
        acconutBtn.setOnClickListener(this);
        mosCodeBtn.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();

        if (id == R.id.btn_activity_memo) {
            Intent intent = new Intent(this, MemoActivity.class);
            startActivity(intent);
        } else if (id == R.id.btn_activity_goaltest) {
            Intent intent = new Intent(this, GoalActivity.class);
            startActivity(intent);
        } else if (id == R.id.btn_activity_calendar) {
            Intent intent = new Intent(this, CalenderActivity.class);
            startActivity(intent);
        } else if (id == R.id.btn_activity_ruler) {
            Intent intent = new Intent(this, RulerActivity.class);
            startActivity(intent);
        } else if (id == R.id.btn_activity_account) {
            Intent intent = new Intent(this, AccountActivity.class);
            startActivity(intent);
        } else if (id == R.id.btn_activity_mos) {
            Intent intent = new Intent(this, MosCodeActivity.class);
            startActivity(intent);
        }
    }
}
